﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.Controls;
using Silvermoon.UI;

namespace Silvermoon.Windows
{
    public abstract class StyleBase
    {
        private static int globalIndex = 0;

        public readonly int Index = globalIndex++;

        public string Name { get; set; }

        public override bool Equals(object obj)
        {
            StyleBase s = obj as StyleBase;
            if (s == null) return false;
            return s.Index == Index;
        }

        public override int GetHashCode()
        {
            return Index;
        }

        public override string ToString()
        {
            return this.GetType().Name.ToString() + ": " + Index.ToString();
        }

        public abstract void Apply(Control c);
    }

}
